package com.ruoyi.factorydata.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.factorydata.domain.StockOutOrderDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 出库单详情Mapper接口
 *
 * @author ruoyi
 * @date 2025-08-26
 */
public interface StockOutOrderDetailMapper extends BaseMapper<StockOutOrderDetail> {
    /**
     * 查询出库单详情
     *
     * @param id 出库单详情主键
     * @return 出库单详情
     */
    public StockOutOrderDetail selectStockOutOrderDetailById(Long id);

    /**
     * 查询出库单详情列表
     *
     * @param stockOutOrderDetail 出库单详情
     * @return 出库单详情集合
     */
    public List<StockOutOrderDetail> selectStockOutOrderDetailList(StockOutOrderDetail stockOutOrderDetail);

    /**
     * 新增出库单详情
     *
     * @param stockOutOrderDetail 出库单详情
     * @return 结果
     */
    public int insertStockOutOrderDetail(StockOutOrderDetail stockOutOrderDetail);

    /**
     * 修改出库单详情
     *
     * @param stockOutOrderDetail 出库单详情
     * @return 结果
     */
    public int updateStockOutOrderDetail(StockOutOrderDetail stockOutOrderDetail);

    /**
     * 删除出库单详情
     *
     * @param id 出库单详情主键
     * @return 结果
     */
    public int deleteStockOutOrderDetailById(Long id);

    /**
     * 批量删除出库单详情
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteStockOutOrderDetailByIds(Long[] ids);

    /**
     * 获取申请数量
     *
     */
    Long getApplyNum(@Param("orderId") Long orderId);
}